<#include "/includes/vars.inc">  
<@pp.dropOutputFile />
<#assign fileName = "${webDir}/top.xhtml">
<#if !pp.outputFileExists(fileName)>
	<@pp.changeOutputFile name="${fileName}" />
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <ui:composition>
        <p:ajaxStatus styleClass="ajaxloading">
            <f:facet name="start">
                <h:outputText value="${r"#{"}msg.loading}" />
                <h:graphicImage library="images" name="ajax_loader.gif"/>
            </f:facet>
            <f:facet name="complete">
                <h:outputText value="" />
            </f:facet>
        </p:ajaxStatus>
        <h:outputText styleClass="jeecode-logo" style="margin-left:20px;color:orange;" value="jee" />
        <h:outputText styleClass="jeecode-logo" value="code" />
        <h:outputText styleClass="logo" value="${r"#{"}msg.appCompany}" />

        <h:form id="formMenuTop" 
                style="float:right;margin-right:20px">  
            <p:commandLink value="${r"#{"}msg.home}" 
                           ajax="false"
                           action="/index.jsf"
                           styleClass="link-menu"
                           style="color:white;" />
            <p:spacer width="5"/>
            <h:commandLink id="switchToEnglish"
                           value="${r"#{"}msg.english}"
                           styleClass="link-menu"
                           actionListener="${r"#{"}localeController.changeLocale}">
                <f:param name="language" value="en" />
                <f:param name="country" value="Us" />
            </h:commandLink>
            <p:spacer width="5"/>
            <h:commandLink id="switchToSpanish"
                           styleClass="link-menu"
                           value="${r"#{"}msg.spanish}"
                           actionListener="${r"#{"}localeController.changeLocale}">
                <f:param name="language" value="es" />
                <f:param name="country" value="Es" />
            </h:commandLink>
            <p:spacer width="5"/>
            <p:commandLink  rendered="${r"#{"}!loginController.loggedIn}"
                            value="${r"#{"}msg.login}"  
                            action="/login.jsf"
                            ajax="false"
                            styleClass="link-menu"/>
            <p:spacer width="5"/>
            <p:commandLink  rendered="${r"#{"}loginController.loggedIn}"
                            value="${r"#{"}msg.logout}"  
                            actionListener="${r"#{"}loginController.logout}"
                            ajax="false"
                            styleClass="link-menu"/>
        </h:form>   
    </ui:composition>
</html>
</#if>